﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ScheduleManagement.BLL
{
    public class MainFrom_Bll
    {
        ScheduleManagement.DAL.MainFrom_Dal mainfrmDALOperation = new ScheduleManagement.DAL.MainFrom_Dal();
        public System.Data.DataSet List(int flag,int u_Id)
        {
            return mainfrmDALOperation.List(flag,u_Id);
        }



        public System.Data.SqlClient.SqlDataReader List_cboRemind()
        {
            return mainfrmDALOperation.ListRemind();
        }

        public System.Data.SqlClient.SqlDataReader List_cboSqType()
        {
            return mainfrmDALOperation.ListSqType();
        }

        public System.Data.SqlClient.SqlDataReader List_cboStpType()
        {
            return mainfrmDALOperation.ListStpType();
        }

        public System.Data.SqlClient.SqlDataReader List_cboStatus()
        {
            return mainfrmDALOperation.ListStatus();
        }

        public System.Data.DataSet Select(bool p_Merge, bool p_HideFinish, string p,string type)
        {
            if (p_Merge == false)
            {

                return mainfrmDALOperation.SigleSelect(p_HideFinish,p,type);

            }
            else
            {
                return mainfrmDALOperation.MergeSelect(p_HideFinish,p);
            }
        }


        
        //public System.Data.DataSet ListAllSchedule()
        //{
        //    return mainfrmDALOperation.ListAll(flag,u_Id);
        //}
        //查询当前用户所有日程信息
        public System.Data.DataSet ListAllSchedule()
        {
            return mainfrmDALOperation.ListAll();
        }



        //public ScheduleManagement.MODEL.Schedulequality GetStpId(string p)
        //{
        //    return mainfrmDALOperation.GetStpId(p);
        //}
        //public ScheduleManagement.MODEL.Schedulequality GetSqId(string p)
        //{
        //    return mainfrmDALOperation.GetSqId(p);
        //}

        public string GetSqId(string p)
        {
            return mainfrmDALOperation.GetSqId(p);
        }

        public string GetStpId(string p)
        {
            return mainfrmDALOperation.GetStpId(p);
        }

        public void AddSchedule(ScheduleManagement.MODEL.Schedule sch)
        {
            mainfrmDALOperation.AddSchedule(sch);
        }
    }
}
